-
Notifications
You must be signed in to change notification settings - Fork 55
[WC-3073] selection helper ticket #1920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the selection helper widget to use MobX for better state management and reactivity. The changes modernize the context API to directly expose the MobX-enabled MultiSelectionHelper and update the SelectionHelper component to be a MobX observer.
- Adds MobX observability to MultiSelectionHelper class with proper observable/computed/action decorators
- Simplifies the context API to directly expose the selection helper instead of a custom wrapper object
- Updates the SelectionHelper component to use MobX observer pattern for reactive rendering
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
packages/shared/widget-plugin-grid/src/selection/helpers.ts | Adds MobX decorators to MultiSelectionHelper and implements togglePageSelection method |
packages/shared/widget-plugin-grid/src/selection/context.ts | Simplifies context API to directly expose SelectionStore interface |
packages/pluggableWidgets/selection-helper-web/src/package.xml | Updates version from 3.3.0 to 3.6.1 |
packages/pluggableWidgets/selection-helper-web/src/components/SelectionHelperComponent.tsx | Adds TODO comment and reorders imports |
packages/pluggableWidgets/selection-helper-web/src/SelectionHelper.tsx | Converts component to MobX observer and updates property access |
packages/pluggableWidgets/selection-helper-web/package.json | Updates version and adds mobx-react-lite dependency |
packages/pluggableWidgets/selection-helper-web/CHANGELOG.md | Adds changelog entry for checkbox state synchronization fix |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
1e2d9b0
to
4eb380e
Compare
Needs rebase |
Pull request type
Bug fix (non-breaking change which fixes an issue)
Description
Fix issue with checkbox state by making it observable